Return to doc.sitecore.com

4.  Valid Properties

CssClass

Type: System.String

Property value:

The Css class name for the control.

Example:

.news

{

   width:170px;

}

 

CssStyle

Type: System.String

Property value:

The style for the control.

DividerCssClass

Type: System.String

Property value:

The Css class name for the divider.

Note:

The divider is placed after the news message only, not after the date title.

 

DividerStyle

Type: System.String

Property value:

The style for the divider.

 

TextCssClass

Type: System.String

Property value:

The Css class name for the news text.

 

TextStyle

Type: System.String

Property value:

The style for the news text.

Example:

.basic

{

  padding: 4px 15px 4px 15px;

  color: Maroon;

  font-family: Arial, Helvetica, sans-serif;

  font-size: 80%;

  font-weight: bold;

}

 

TitleCssClass

Type: System.String

Property value:

The Css class name for the news title.

Example:

.newstitle

{

  font-family: Arial, Helvetica, sans-serif;

  font-size: 130%;

  font-weight: bold;

  color: #E33226;

  letter-spacing: -1px;

  border-bottom-width: 1px;

  border-bottom-style: solid;

  border-bottom-color: #6D6D6D;

  padding-left: 15px;

  padding-bottom:3px;

}

 

TitleStyle

Type: System.String

Property value:

The style for the news title.

 

DividerImage

Type: System.String

Property value:

The path to the divider image for the control.

Note:

The divider isn’t shown if this path is not defined. By default, the path is not defined.

 

NewsMessage

Type: System.String

Property value:

The message which will be shown as the news text.

Note:

The message should have the format which can be recognized by the NVelocity class.

For more information about NVelocity see: http://nvelocity.sourceforge.net.

Item, xslHelper and stringHelper objects exist in Velocity by default.

Default value : $item.get_Item('description')

Example:

For example, you want to show an Abstract field in your Item as news. Your message should look like this:

 

$item.get_Item(“Abstract”)

 

This means that the value of the Abstract field will be used as the news message.

 

Example:

 

#if($item.get_Item(\"Country\").Length > 0)

#set ($counter = 0)

#set ($countOfCountries = $stringHelper.Split("|",$item.get_Item("Country")).Length)

#foreach($country in $stringHelper.Split("|",$item.get_Item("Country")))

#set ($counter = $counter + 1)

$item.Database.Items.get_Item("$country").Name

#if(($counter != $countOfCountries))

, #else

: #end

#end

#end

$xslHelper.clip($item.get_Item("Abstract"), 80, true)

 

This code will form the following news massage:

 

Country1,…,CountryN: abstract

 

Where Country is a multilist field which holds a list of countries.

Abstract is the Item’s memo field which holds an abstract for news.

 

$xslHelper.clip($item.get_Item("Abstract"), 80, true)

 

The abstract will be not longer than 80 characters (if it is longer, it will be cut and the ellipsis sign will be added to the news message)

 

TranslateStatusField

Type: System.String

Property value:

The name of the field that holds the translate status.

The field that holds the translate status can be any field which is evaluated as text (for example: valuelookup , text or checkbox)

Note:

The default value is “Translate status”.

 

DateFieldName

Type: System.String

Property value:

The name of the field which holds the date of news.

Note:

The default value is “date”.

 

SourceNode

Type: System.String

Property value:

The Sitecore path or ID of an Item which holds news Items.

Note:

The default value is /sitecore/content/News/News Archive.

 

TitleText

Type: System.String

Property value:

The text which will be shown as the title of the news.

Note:

The default value is Latest News.

 

NewsCount

Type: System.Int32

Property value:

The number of the latest news which are to be shown.

Note:

If NewsCount == 0, then all news Items under the SourceNode are shown. The default value is 0.

 

LowerBound

Type: System.String

Property value:

The ISO date of the lower bound of the news date range.

Note:

The ISO date format is: yyyymmdd, where yyyy is the year, mm is the month, dd is the day of the week.

If the LowerBound or UpperBound property is set, the NewsCount property will be applied to the resulting set of news.

The default property value is “00010101”

 

UpperBound

Type: System.String

Property value:

The ISO date of the upper bound of the news date. News with the date equal to UpperBound won’t be included in the output.

Note:

If the LowerBound or UpperBound property is set, the NewsCount property will be applied to the resulting set of news.

The default property value is “00010101”

 

Note:

Some of the properties such as TranslateStatusText and PartionalTranslateStatusText are preserved for compliance with Sitecore 4.

 

TranslateStatusText

Type: System.String

Property value:

The text which identifies whether an Item is translated into a specified language.

 

PartialTranslateStatusText

Type: System.String

Property value:

The text which identifies whether an Item is partially translated into a specified language.